import {request} from "./requests";

export function getDetail(iid) {
  return request({
    method: "get",
    url: "/detail",
    params: {iid: iid}
  })

}


export function getRecommend() {
  return request({
    method: "get",
    url: "/recommend"
  })
}


export class Goods {
  constructor(itemInfo, columns, services) {
    this.title = itemInfo.title
    this.price = itemInfo.price
    this.oldPrice = itemInfo.oldPrice
    this.discount = itemInfo.discountDesc
    this.discountBgColor = itemInfo.discountBgColor
    this.columns = columns
    this.services = services
    this.desc = itemInfo.desc
    this.realPrice = itemInfo.lowNowPrice
  }
}


